﻿using System;

namespace diantou.web.onlineJudge
{
    /// <summary>
    /// 用户勋章
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPool = true, IsReferer = false)]
    partial class medalList : web.user.view<medalList>
    {
        /// <summary>
        /// 用户勋章集合
        /// </summary>
        [fastCSharp.emit.webView.clearMember]
        private diantou.dataAccess.medal[] medals;
        /// <summary>
        /// 分组菜单
        /// </summary>
        private groupMenu groupMenu
        {
            get { return new groupMenu { ViewOnly = requestHeader.IsReView }; }
        }
        /// <summary>
        /// 用户勋章
        /// </summary>
        /// <param name="userId">用户标识</param>
        /// <returns>是否成功</returns>
        private new bool loadView(int userId)
        {
            if (base.load(userId, diantou.dataModel.path.pub.Default.OnlineJudgeAllProblemPath))
            {
                medals = user.Remote.Medals;
                if (requestHeader.IsSearchEngine) pageInfo.Path = user.Path.OnlineJudgeMedal.ToPageString();
                return true;
            }
            return false;
        }
    }
}
